import Vue from 'vue'
import VueRouter from 'vue-router'
// 导入登录注册组件
import Login from '@/views/Login/Login.vue'
// @符号在路径中表示src绝对路径，手脚架为我们配置的
import Reg from '@/views/Reg/Reg.vue'
import Main from '@/views/Main/Main.vue'
Vue.use(VueRouter)

const routes = [
// 一个对象表示一个规则
  {
    path: '/login',
    component: Login
  },
  {
    path: '/reg',
    component: Reg

  },
  {
    path: '/',
    component: Main
  }

]

const router = new VueRouter({
  routes
})

export default router
